package com.phospherus.flow.repository

import com.phospherus.common.repository.BaseRepository
import com.phospherus.flow.entity.*

/**
 * @author songjinlong
 * @version 1.0
 * @since 2017/12/21
 */
interface BusinessAuditRepository : BaseRepository<BusinessAudit, Long> {
    fun findByFormInstId(formInstId: Long): BusinessAudit
}
interface BusinessAuditTablesRepository : BaseRepository<BusinessAuditTables, Long> {
    fun findByFormInstIdAndBaId(formInstId: Long, baId: Long): List<BusinessAuditTables>
}
interface DomesticTradeContractRepository : BaseRepository<DomesticTradeContract, Long> {
    fun findByFormInstId(formInstId: Long): List<DomesticTradeContract>
}

interface DtcGoodsPriceRepository : BaseRepository<DtcGoodsPrice, Long> {
    fun findByFormInstIdAndDtcId(formInstId: Long, dtcId: Long): List<DtcGoodsPrice>
}

interface ForeignTradeContractRepository : BaseRepository<ForeignTradeContract, Long> {
    fun findByFormInstId(formInstId: Long): ForeignTradeContract
}

interface FtcProductDetailsRepository : BaseRepository<FtcProductDetails, Long> {
    fun findByFormInstIdAndFtcId(formInstId: Long, ftcId: Long): List<FtcProductDetails>
}

interface PcOrderInfoRepository : BaseRepository<PcOrderInfo, Long> {
    fun findByFormInstIdAndPcId(formInstId: Long, pcId: Long): List<PcOrderInfo>
}

interface PIRepository : BaseRepository<PI, Long> {
    fun findByFormInstId(formInstId: Long): PI
}

interface PriceInformationRepository : BaseRepository<PriceInformation, Long> {
    fun findByFormInstIdAndPiId(formInstId: Long, piId: Long): List<PriceInformation>
}

interface ProfitCalculationRepository : BaseRepository<ProfitCalculation, Long> {
    fun findByFormInstId(formInstId: Long): ProfitCalculation
}



//保证金付款发票
interface DepositPayRepository : BaseRepository<DepositPay, Long> {
    fun findByFormInstId(formInstId: Long): DepositPay
}
interface DpPriceInformationRepository : BaseRepository<DpPriceInformation, Long> {
    fun findByFormInstIdAndDpId(formInstId: Long, piId: Long): List<DpPriceInformation>
}


//通知付款
interface PaymentNoticeRepository : BaseRepository<PaymentNotice, Long> {
    fun findByFormInstId(formInstId: Long): PaymentNotice
}
interface PnGoodDetailRepository : BaseRepository<PnGoodDetail, Long> {
    fun findByFormInstIdAndPnId(formInstId: Long, piId: Long): List<PnGoodDetail>
}


